#pragma once
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#define true 1
#define false 0
typedef int HPDataType;

typedef struct Heap
{
	HPDataType* a;
	int size;
	int capacity;
}Heap;

//void HeapCreat(Heap* hp,HPDataType *a,int n);
void Swap(HPDataType* a, int child, int parent);
void HeapPrint(Heap* hp);
void AdjustDown(HPDataType* a, int size, int parent);
void AdjustUp(HPDataType* a, int child);
void HeapInit(Heap* hp);
void HeapDestroy(Heap* hp);
void HeapPush(Heap* hp, int data);
void HeapPop(Heap* hp);
HPDataType HeapTop(Heap* hp);
int HeapSize(Heap* hp);
int HeapEmpty(Heap* hp);
